package com.ruoyi.web.controller.app.service;

import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.web.exception.base.XException;
import com.ruoyi.web.controller.util.BankCardUtil;
import org.springframework.stereotype.Service;

/**
 * @ClassName AppBankCandService
 * @Description TODO
 * @Author tyc@yanyu
 * @Date 2018/12/18 0018 10:02
 **/
@Service
public class AppBankCandService {
    /**
     * 通过卡号查询银行名称
     * @param bankCardNum
     * @return
     */
    public Object getBankName(String bankCardNum) {
        if (StringUtils.isBlank(bankCardNum)){
            throw new XException("银行卡号不能为空");
        }
        String nameOfBank = BankCardUtil.getNameOfBank(bankCardNum);
        return nameOfBank;
    }



}
